import rs from '../.rs'


export const routerAggregate = rs.map(s => {
    if (/:/.test(s)) {
        return {
            path: `/${s.split(":")[1]}`,
            component: () => import(`../routes/${s.split(":")[0]}/${s.split(":")[1]}/index`),
            models: () => [import(`../routes/${s.split(":")[0]}/${s.split(":")[1]}/module`)],
        }
    } else {
        return {
            path: `/${s}`,
            component: () => import(`../routes/${s}/index`),
            models: () => [import(`../routes/${s}/module`)],
        }
    }

})